extends Control


# 大子移动
func _on_移动_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_BIG_MOVE):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.big_move)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_赐福_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_精灵_赐福):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.精灵_赐福)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_庇护_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_精灵_庇护):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.精灵_庇护)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_移动_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("移动：消耗1点能量，移动到落点")


func _on_赐福_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("赐福：消耗1点能量，选择一个己方大子使其获得护盾")


func _on_庇护_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("庇护：消耗1点能量，选择一个己方大子使其获得潜行")


func _on_mouse_exited():
	var ui = ObjectManager.gameManager.ui as UI
	ui.closeDesc()
